//
//  CellForTypeOfDetail.m
//  喜马拉雅FM
//
//  Created by dllo on 16/3/2.
//  Copyright © 2016年 lanou.com. All rights reserved.
//

#import "CellForTypeOfDetail.h"
#import "UIImageView+WebCache.h"
#import "ModelForTypeOfListOfDetail.h"
#import "ModelForBangDan.h"
#import "ModeForZhuBoBangDan.h"


#import "ModelForSecendVC.h"

#import "ModelForListen.h"

@interface CellForTypeOfDetail ()


@property (nonatomic, retain) UIImageView *imageForCoverMiddle;
@property (nonatomic, retain) UILabel *labelForTitle;
@property (nonatomic, retain) UILabel *labelForIntro;


@end

@implementation CellForTypeOfDetail

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        
  
        [self createSubViews];
      
    }

    return self;
}

- (void)createSubViews {

    self.imageForCoverMiddle = [[UIImageView alloc]initWithImage:[UIImage imageNamed:@"2.jpg"]];
    self.imageForCoverMiddle.frame = CGRectMake(10, 10, 80, 80);
    [self.contentView addSubview:self.imageForCoverMiddle];
    [self.imageForCoverMiddle release];
    
    
    self.labelForTitle = [[UILabel alloc]initWithFrame:CGRectMake(100, 10, [UIScreen mainScreen].bounds.size.width - 100, 50)];
    [self.contentView addSubview:self.labelForTitle];
    self.labelForTitle.font = [UIFont systemFontOfSize:20];
    self.labelForTitle.numberOfLines = 0;
    [self.labelForTitle release];
    self.labelForTitle.text = @"云中歌";
    
    self.labelForIntro = [[UILabel alloc]initWithFrame:CGRectMake(100, 60, [UIScreen mainScreen].bounds.size.width - 100 - 20, 20)];
    [self.contentView addSubview:self.labelForIntro];
    [self.labelForIntro release];
    self.labelForIntro.textColor = [UIColor grayColor];
    self.labelForIntro.numberOfLines = 0;
    self.labelForIntro.text = @"荒漠少女遇美男";
    

}

- (void)passModelTypeForListDetail:(ModelForListen *)model {

        [self.imageForCoverMiddle sd_setImageWithURL:[NSURL URLWithString:model.coverSmall] placeholderImage:[UIImage imageNamed:@"2.jpg"]];
        self.labelForTitle.text = model.title;
        self.labelForIntro.text = model.lastUptrackTitle;
}

- (void)passModelForBangDan:(ModelForListen *)model {

    [self.imageForCoverMiddle sd_setImageWithURL:[NSURL URLWithString:model.coverSmall] placeholderImage:[UIImage imageNamed:@"2.jpg"]];
    self.labelForTitle.text = model.title;
    self.labelForIntro.text = model.nickname;

}

- (void)passModelForZhuBoBangDan:(ModeForZhuBoBangDan *)model {

    [self.imageForCoverMiddle sd_setImageWithURL:[NSURL URLWithString:model.middleLogo] placeholderImage:[UIImage imageNamed:@"2.jpg"]];
    self.labelForTitle.text = model.nickname;
    self.labelForIntro.text = model.personDescribe;

}

- (void)passModelForZhuBo:(ModelForSecendVC *)model {

    [self.imageForCoverMiddle sd_setImageWithURL:[NSURL URLWithString:model.coverSmall] placeholderImage:[UIImage imageNamed:@"2.jpg"]];
    self.labelForTitle.text = model.title;
    self.labelForIntro.text = model.nickname;

    
}


- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
